<?php 
	session_start();
	if (isset($_SESSION['username']) && isset($_SESSION['uid'])) {
		require('../../Controller/MaintainSystem_controller.php');
		$admin = new MaintainSystem();
		$account = $_SESSION['username'];
		$uid = $_SESSION['uid'];
		if($admin->checkUser($account, $uid)){
			
			$deluid = $_POST['deluid'];
			$result = $admin->delUser($deluid);
			header("location:./UserInfo.php");
		}else {
			header("location:../../login.php");
		}	
	}else {
		header("location:../../login.php");
	}
?>